<template>
<div>
  <!--航班详情内容-->
  <div class="left-top" v-show="isShow">
    <h5 class="df aic">
      <span>{{ item.flightInfo.flightNumber }}</span>
      <span v-if="item.flightInfo.flightType == 'B'" class="fenge">|</span>
      <span v-if="item.flightInfo.flightType == 'B'">{{
          item.flightInfo.flightNumber
        }}</span>
    </h5>
    <div class="df aic">
      <div class="colum1">
        <div>
          {{ item.flightSchedule.startTime.substr(0,9)}}
        </div>
        <div>
          <!--              {{ flightData.flightSchedule.startTime.replace("T", " ").slice(-13, -3) }}-->
          {{ item.flightSchedule.startTime.substr(11,8) }}
        </div>
        <p>{{ item.startStationDisplay }}</p>
      </div>
      <div class="colum2 df fdc jcc">
        <div class="kuagn df aic jcc">
          <div class="df aic jcc">
            <span v-if="item.flightInfo.flightType == 'A'">直达航班</span>
            <span v-else-if="item.flightInfo.flightType == 'B'" style="color: #409eff">中转航班</span>
            <span v-else-if="item.flightInfo.flightType == 'C'" style="color: #409eff">联程航班</span>
          </div>
        </div>
        <p>
          总时长:{{
            parseInt(item.flightSchedule.duration / 60) > 0
                ? parseInt(item.flightSchedule.duration / 60) +
                "h" +
                (item.flightSchedule.duration % 60) +
                "m"
                : item.flightSchedule.duration % 60
          }}
        </p>
      </div>
      <div class="colum1">
        <div>{{ item.flightSchedule.endTime.substr(11,8) }}</div>
        <p>{{ item.endStationDisplay }}</p>
      </div>
    </div>
  </div>
</div>
</template>

<script>
export default {
  name: "flightDetail"
}
</script>

<style scoped>

</style>
